<table cellpadding="5">
	<input name="id" type="hidden" value="${(cmsAdvertisementItem.id)!}" />
	<tr>
		<td class="tbLabel">广告名称:</td>
		<td>
			<input name="adName"  class="easyui-validatebox textbox" data-options="required: false" value="${(cmsAdvertisementItem.adName)!}"/>
		</td>
	</tr>
	<tr>
		<td class="tbLabel">广告描述:</td>
		<td>
			<input name="adDesc"  class="easyui-validatebox textbox" data-options="required: false" value="${(cmsAdvertisementItem.adDesc)!}"/>
		</td>
	</tr>
	<tr>
		<td class="tbLabel">广告链接:</td>
		<td>
			<input name="adUrl"  class="easyui-validatebox textbox" data-options="required: false" value="${(cmsAdvertisementItem.adUrl)!}"/>
		</td>
	</tr>
	<tr>
		<td class="tbLabel">广告图片:</td>
<!-- 		<td> -->
<!-- 			<input name="adPic"  class="easyui-validatebox textbox" data-options="required: false" value="${(cmsAdvertisementItem.adPic)!}"/> -->
<!-- 		</td> -->
		<td>
			<input id="cmsAdvertisementPic" name="adPic" type="hidden"  value="${(cmsAdvertisementItem.adPic)!}"/>
			<div>
				<span id="uploadCmsAdvertisementPic"></span>
				<span id="uploadCmsAdvertisementPicShow">
				<#if cmsAdvertisementItem??>
				<img src="${(cmsAdvertisementItem.adPic)!}" width="320" height="70"/>
				</#if>	
				</span>
			</div>
            <span style="display:none">
            	<input id="btnCmsAdvertisementPicCancel" type="button" value="取消全部上传" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 22px;" />
           	</span>
		</td>
	</tr>
	<tr>
		<td class="tbLabel">排序:</td>
		<td>
			<input name="adOrder" style="width:158px;" class="easyui-numberbox"  precision="0" data-options="required: false" value="${(cmsAdvertisementItem.adOrder)!}" />
		</td>
	</tr>
</table>
<script>
var swfInstrPhoto = new SWFUpload({
	flash_url : "static/plugins/swfupload/swfupload.swf",
   upload_url: "common.do?uploadFile",
   file_post_name:"filedata",
   post_params: {"name" : "zwm"},
   use_query_string:true,
    file_size_limit : "10 MB",
       file_types : "*.jpg;*.gif;*.png;*.bmp",    //这是全部文件都可以上传，如果要限制只有某些文件上传，则可以这么写 file_types : "*.jpg;*.gif;*.png",
       file_types_description : "图片",
//        file_upload_limit : 1,
       file_queue_limit : 0,
       custom_settings : {
           progressTarget : "fsUploadProgress",
           cancelButtonId : "btnCmsAdvertisementPicCancel"
       },

       button_image_url : "static/plugins/swfupload/swfbtn.png",
 		button_placeholder_id : "uploadCmsAdvertisementPic",
 		button_text: "<span class='abtn'>上传图片</span>",
 		button_window_mode:"transparent",
 		button_width: 80,
 		button_height: 24,
 		button_text_left_padding: 22,
 		button_text_top_padding: 2,
       // The event handler functions are defined in handlers.js
       file_queued_handler : fileQueued,
       file_queue_error_handler : fileQueueError,
       file_dialog_complete_handler : fileDialogComplete,
       upload_error_handler : uploadError,
       upload_success_handler : uploadInstrPhotoSuccess,
       upload_complete_handler : uploadComplete,
       queue_complete_handler : queueComplete    // Queue plugin event
});

function uploadInstrPhotoSuccess(file,rs) {
	 
	  var json = eval('(' + rs + ')');
	  $('#uploadCmsAdvertisementPicShow').html('<img src="'+json.obj+'" width="320" height="70"/>');	
	  $('#cmsAdvertisementPic').val(json.obj);
	}
</script>